<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
  <meta name="generator" content="Hugo 0.108.0">
  <title>Signin page</title>
  <link rel="canonical" href="https://getbootstrap.com/docs/5.3/examples/sign-in/">
  <link href="../static/plugins/bootstrap-5.3.0-alpha1-dist/css/bootstrap.min.css" rel="stylesheet">
  <link href="../static/css/sign-in.css" rel="stylesheet">
  <style>
    body {
      background: #f8f9fa;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .form-signin {
      max-width: 380px;
      padding: 15px;
      background: #fff;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }

    .form-signin .form-floating {
      margin-bottom: 15px;
    }

    .form-signin .checkbox {
      margin-bottom: 20px;
    }

    .form-signin .btn-primary {
      background-color: #007bff;
      border-color: #007bff;
    }

    .form-signin .btn-primary:hover {
      background-color: #0056b3;
      border-color: #0056b3;
    }

    .form-signin .link {
      color: #007bff;
      text-decoration: none;
    }

    .form-signin .link:hover {
      text-decoration: underline;
    }
  </style>
</head>

<body class="text-center">

  <main class="form-signin w-100 m-auto">
    <form method="POST" action="{% url 'login_info' %}">
      {% csrf_token %}
      <h1 class="h3 mb-3 fw-normal">Login</h1>

      <!-- 错误信息显示区域 -->
      {% if error_message %}
      <div class="alert alert-danger" role="alert">
        {{ error_message }}
      </div>
      {% endif %}

      <!-- 成功信息显示区域 -->
      {% if success_message %}
      <div class="alert alert-success" role="alert">
        {{ success_message }}
      </div>
      {% endif %}

      <div class="form-floating">
        <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com" name="email">
        <label for="floatingInput">Email address</label>
      </div>
      <div class="form-floating">
        <input type="password" class="form-control" id="floatingPassword" placeholder="Password" name="password">
        <label for="floatingPassword">Password</label>
      </div>
      <div class="mb-3">
        <a href="{% url 'signin' %}" class="link">去注册</a>
        <a href="{% url 'forgot_password' %}" class="link float-end">忘记密码？</a>
      </div>
      <button class="w-100 btn btn-lg btn-primary" type="submit">Login</button>
    </form>
    <p class="mt-5 mb-3 text-muted">&copy; 2024–2036</p>
  </main>
</body>

</html>